

var o = require("websocketJS");
module.exports = {
    login: function (t) {
        var e = this;
        e.wsJS = new o(), e.wsJS.initWebsocketBindFun({
            runMode: 0,
            playerId: t.openid,
            loginFun: function () {
                console.log(" login success Fun  end "), t.success(), e.isLogin = !0;
            },
            onCloseFun: function (e) {
                console.log(" onClose Fun  end "), t.close();
            }
        });
    },
    isReleaseorAudit: function (t) {
        this.wsJS.SendGetRequestBindFun({
            key_word: "ws_get_config",
            sendGetFun: function (e, n) {
                console.log(" SendGetRequestBindFun  callback :" + e), t.success(JSON.parse(e));
            }
        });
    },
    getServerTime: function (t) {
        this.wsJS.SendGetServerUtcBindFun({
            sendGetFun: function (e, n) {
                console.log("server:" + e), t.success(e);
            }
        });
    },
    getRedPacket: function (t) {
        this.wsJS.SendGetGameArchiveBindFun({
            sendGetFun: function (e, n) {
                console.log("SendGetGameArchiveBindFun  callback :" + e), console.log(n), t.success(e);
            }
        });
    },
    setRedPacket: function (t) {
        this.wsJS.SendPostGameArchiveBindFun({
            valWord: t,
            sendPostFun: function (t, e) {
                console.log("SendPostGameArchiveBindFun  callback :", t), console.log(e);
            }
        });
    }
}